/**
 *  Created by chentao on 2018/1/2.
 *
 *  屏幕适配,根据UI设计图和手机的屏幕大小按照百分比的方式进行取值
 */

import { Dimensions, StatusBar, Platform } from 'react-native'

// UI设计图的宽高
const designWidth = 750
const designHeight = 1334

// 手机屏幕宽高
export const { width, height } = Dimensions.get('window')

// 计算手机屏幕宽度对应设计图宽度的单位宽度
export const unitWidth = width / designWidth

// 计算手机屏幕高度对应设计图高度的单位高度
export const unitHeight = height / designHeight
// 状态栏的高度
export const statusBarHeight = Platform.OS === 'ios' ? 20 : StatusBar.currentHeight
// 标题栏的高度
export const titleHeight = unitWidth * 40

// 普通字体
export const textSizebig = unitWidth * 60
export const textSizeNormal = unitWidth * 35
export const textSizeSmall = unitWidth * 30
export const textSize42 = unitWidth * 42
export const textSize20 = unitWidth * 20
export const textSize28 = unitWidth * 28
export const textSize36 = unitWidth * 36
export const textSize24 = unitWidth * 24
export const textSize18 = unitWidth * 18
export const textSize16 = unitWidth * 16
export const textSize14 = unitWidth * 14
export const textSize12 = unitWidth * 12
